import request from "@/utils/request";

export function add(data) {
  return request({
    url: "api/project/projectSave",
    method: "post",
    data,
  });
}

export function del(ids) {
  return request({
    url: "api/project/deleteProject?id=" + ids,
    method: "get",
  });
}
// 任务详情
export function getSxInfoDetail(id) {
  return request({
    url: "api/project/projectInfo?id=" + id,
    method: "get",
  });
}
// 任务状态修改
export function changeSxInfoStatus(id) {
  return request({
    url: "api/project/changeProjectStatus?id=" + id,
    method: "get",
  });
}
export function edit(data) {
  return request({
    url: "api/project/projectSave",
    method: "post",
    data,
  });
}

//项目学员
export function getProjectMember(id) {
  return request({
    url: "api/project/getProjectMember?id=" + id,
    method: "get",
  });
}

//研学风采（相册列表）
export function getProjectAlbumList(id) {
  return request({
    url: "api/project/getProjectAlbumList?bindingId=" + id,
    method: "get",
  });
}

//研学风采相册编辑
export function albumEdit(data) {
  return request({
    url: "api/project/albumEdit",
    method: "post",
    data,
  });
}

//研学风采素材上传
export function imgSubmit(data) {
  return request({
    url: "api/project/imgSubmit",
    method: "post",
    data,
  });
}

//研学风采素材删除
export function delImg(id) {
  return request({
    url: "api/project/delImg?id=" + id,
    method: "get",
  });
}

//研学风采素材列表
export function albumImgList(data) {
  return request({
    url: "api/project/albumImgList",
    method: "post",
    data,
  });
}

export default { add, edit, del, getSxInfoDetail, changeSxInfoStatus };
